layui.use(['table','element'], function(){
    var table = layui.table;
    var element = layui.element;
    table.render({
        elem: '#test1'
        ,even:"true"
        ,width:960
        // ,cellMinWidth: 80 //全局定义常规单元格的最小宽度，layui 2.2.1 新增
        ,page:true
        ,limit: 15
        ,limits: [10, 15, 20, 25]
        ,cols: [[
            {field:'worksImage', width:130, title: '作品封面',templet: '<div><img src="{{ d.worksImage}}"></div>'}
            ,{field:'worksname', width:130, title: '作品名称',sort:true}
            ,{field:'author', width:110, title: '作者', sort: true}
            ,{field:'votes', width:110, title: '获得票数', sort: true}
            ,{field:'worksAddress', title: '所在地址' ,width:157} //minWidth：局部定义当前单元格的最小宽度，layui 2.2.1 新增
            ,{field:'worksUnit', title: '所属单位', width: '20%', minWidth: 100}
            ,{field:'uploadTime', title: '参与时间',width:130}
        ]]
        ,data: [{
            "worksImage": "../../images/userface4.jpg"
            ,"worksname": "朗读《小王子》"
            ,"author":"杜晓宇"
            ,"votes": "15415"
            ,"worksAddress": "重庆市-渝中区"
            ,"worksUnit": "重庆市儿童图书馆"
            ,"uploadTime":"2019-08-08"
        },{
            "worksImage": "../../images/userface4.jpg"
            ,"worksname": "朗读《小王子》"
            ,"author":"杜晓宇"
            ,"votes": "15415"
            ,"worksAddress": "重庆市-渝中区"
            ,"worksUnit": "重庆市儿童图书馆"
            ,"uploadTime":"2019-08-08"
        },{
            "worksImage": "../../images/userface4.jpg"
            ,"worksname": "朗读《小王子》"
            ,"author":"杜晓宇"
            ,"votes": "15415"
            ,"worksAddress": "重庆市-渝中区"
            ,"worksUnit": "重庆市儿童图书馆"
            ,"uploadTime":"2019-08-08"
        },{
            "worksImage": "../../images/userface4.jpg"
            ,"worksname": "朗读《小王子》"
            ,"author":"杜晓宇"
            ,"votes": "15415"
            ,"worksAddress": "重庆市-渝中区"
            ,"worksUnit": "重庆市儿童图书馆"
            ,"uploadTime":"2019-08-08"
        },{
            "worksImage": "../../images/userface4.jpg"
            ,"worksname": "朗读《小王子》"
            ,"author":"杜晓宇"
            ,"votes": "15415"
            ,"worksAddress": "重庆市-渝中区"
            ,"worksUnit": "重庆市儿童图书馆"
            ,"uploadTime":"2019-08-08"
        },{
            "worksImage": "../../images/userface4.jpg"
            ,"worksname": "朗读《小王子》"
            ,"author":"杜晓宇"
            ,"votes": "15415"
            ,"worksAddress": "重庆市-渝中区"
            ,"worksUnit": "重庆市儿童图书馆"
            ,"uploadTime":"2019-08-08"
        },{
            "worksImage": "../../images/userface4.jpg"
            ,"worksname": "朗读《小王子》"
            ,"author":"杜晓宇"
            ,"votes": "15415"
            ,"worksAddress": "重庆市-渝中区"
            ,"worksUnit": "重庆市儿童图书馆"
            ,"uploadTime":"2019-08-08"
        },{
            "worksImage": "../../images/userface4.jpg"
            ,"worksname": "朗读《小王子》"
            ,"author":"杜晓宇"
            ,"votes": "15415"
            ,"worksAddress": "重庆市-渝中区"
            ,"worksUnit": "重庆市儿童图书馆"
            ,"uploadTime":"2019-08-08"
        },{
            "worksImage": "../../images/userface4.jpg"
            ,"worksname": "朗读《小王子》"
            ,"author":"杜晓宇"
            ,"votes": "15415"
            ,"worksAddress": "重庆市-渝中区"
            ,"worksUnit": "重庆市儿童图书馆"
            ,"uploadTime":"2019-08-08"
        },{
            "worksImage": "../../images/userface4.jpg"
            ,"worksname": "朗读《小王子》"
            ,"author":"杜晓宇"
            ,"votes": "15415"
            ,"worksAddress": "重庆市-渝中区"
            ,"worksUnit": "重庆市儿童图书馆"
            ,"uploadTime":"2019-08-08"
        },{
            "worksImage": "../../images/userface4.jpg"
            ,"worksname": "朗读《小王子》"
            ,"author":"杜晓宇"
            ,"votes": "15415"
            ,"worksAddress": "重庆市-渝中区"
            ,"worksUnit": "重庆市儿童图书馆"
            ,"uploadTime":"2019-08-08"
        },{
            "worksImage": "../../images/userface4.jpg"
            ,"worksname": "朗读《小王子》"
            ,"author":"杜晓宇"
            ,"votes": "15415"
            ,"worksAddress": "重庆市-渝中区"
            ,"worksUnit": "重庆市儿童图书馆"
            ,"uploadTime":"2019-08-08"
        },{
            "worksImage": "../../images/userface4.jpg"
            ,"worksname": "朗读《小王子》"
            ,"author":"杜晓宇"
            ,"votes": "15415"
            ,"worksAddress": "重庆市-渝中区"
            ,"worksUnit": "重庆市儿童图书馆"
            ,"uploadTime":"2019-08-08"
        },{
            "worksImage": "../../images/userface4.jpg"
            ,"worksname": "朗读《小王子》"
            ,"author":"杜晓宇"
            ,"votes": "15415"
            ,"worksAddress": "重庆市-渝中区"
            ,"worksUnit": "重庆市儿童图书馆"
            ,"uploadTime":"2019-08-08"
        },{
            "worksImage": "../../images/userface4.jpg"
            ,"worksname": "朗读《小王子》"
            ,"author":"杜晓宇"
            ,"votes": "15415"
            ,"worksAddress": "重庆市-渝中区"
            ,"worksUnit": "重庆市儿童图书馆"
            ,"uploadTime":"2019-08-08"
        },{
            "worksImage": "../../images/userface4.jpg"
            ,"worksname": "朗读《小王子》"
            ,"author":"杜晓宇"
            ,"votes": "15415"
            ,"worksAddress": "重庆市-渝中区"
            ,"worksUnit": "重庆市儿童图书馆"
            ,"uploadTime":"2019-08-08"
        },{
            "worksImage": "../../images/userface4.jpg"
            ,"worksname": "朗读《小王子》"
            ,"author":"杜晓宇"
            ,"votes": "15415"
            ,"worksAddress": "重庆市-渝中区"
            ,"worksUnit": "重庆市儿童图书馆"
            ,"uploadTime":"2019-08-08"
        },{
            "worksImage": "../../images/userface4.jpg"
            ,"worksname": "朗读《小王子》"
            ,"author":"杜晓宇"
            ,"votes": "15415"
            ,"worksAddress": "重庆市-渝中区"
            ,"worksUnit": "重庆市儿童图书馆"
            ,"uploadTime":"2019-08-08"
        },{
            "worksImage": "../../images/userface4.jpg"
            ,"worksname": "朗读《小王子》"
            ,"author":"杜晓宇"
            ,"votes": "15415"
            ,"worksAddress": "重庆市-渝中区"
            ,"worksUnit": "重庆市儿童图书馆"
            ,"uploadTime":"2019-08-08"
        },{
            "worksImage": "../../images/userface4.jpg"
            ,"worksname": "朗读《小王子》"
            ,"author":"杜晓宇"
            ,"votes": "15415"
            ,"worksAddress": "重庆市-渝中区"
            ,"worksUnit": "重庆市儿童图书馆"
            ,"uploadTime":"2019-08-08"
        },{
            "worksImage": "../../images/userface4.jpg"
            ,"worksname": "朗读《小王子》"
            ,"author":"杜晓宇"
            ,"votes": "15415"
            ,"worksAddress": "重庆市-渝中区"
            ,"worksUnit": "重庆市儿童图书馆"
            ,"uploadTime":"2019-08-08"
        },{
            "worksImage": "../../images/userface4.jpg"
            ,"worksname": "朗读《小王子》"
            ,"author":"杜晓宇"
            ,"votes": "15415"
            ,"worksAddress": "重庆市-渝中区"
            ,"worksUnit": "重庆市儿童图书馆"
            ,"uploadTime":"2019-08-08"
        },{
            "worksImage": "../../images/userface4.jpg"
            ,"worksname": "朗读《小王子》"
            ,"author":"杜晓宇"
            ,"votes": "15415"
            ,"worksAddress": "重庆市-渝中区"
            ,"worksUnit": "重庆市儿童图书馆"
            ,"uploadTime":"2019-08-08"
        }
        ]
    });
});